﻿$(document).ready(function () {

    $(function () {


        //hideOnSomePages();


        $('.top-hint-close-button').click(function () {
            hideTopHint();
        });


        $('.top-hint-mainPart').click(function (event) {
            event.preventDefault();
            window.location.href = "http://boolan.com/jjhou/event/201511";
            //window.location.href = "/major";
            //$.getJSON('/TopHint/CloseHint', {}, function (data) {
            //    if (data.status === 'ok') {
            //window.location.href = "/geekband";
            //}
        });
    });
});


function hideTopHint() {
    $.getJSON('/TopHint/CloseHint', {}, function (data) {
        if (data.status === 'ok') {
            $('#top-hint').hide();
        }
    })
}


function hideOnSomePages() {
    var geekbandPattern = /\/geekband/i;


    if (window.location.pathname == "/" ||
        geekbandPattern.test(window.location.pathname)) {
        $('#top-hint').hide();
    }
}